<template>
	<view>
		<hx-navbar ref="hxnb" :config="config" />
		<view class="navName" style="margin-top: 14rpx;">
			<view class="flex align-center" style="margin: 25rpx 0;" v-for="(item,index) in groupChatData" :key="index">
				<image class="sculptureImg" :src="item.avatar" mode=""></image>
				<view style="margin-left: 20rpx;">
					<view
						style="text-align: center;margin: 10rpx 0;font-size: 28rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
						{{item.personGroupName}}</view>
					<image class="Img" v-if="item.personType == 3" src="/static/tabbar/azhuang.png" mode=""></image>
					<image class="Img" v-if="item.personType == 4" src="/static/tabbar/yezhu.png" mode=""></image>
					<image style="width: 84rpx;height: 30rpx;" v-if="item.personType == 1" src="/static/tabbar/shejishi.png" mode=""></image>
					<image class="Img" v-if="item.personType == 2" src="/static/tabbar/gongchang.png" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 标题栏配置
				config: {
					title: "项目成员",
					back: true,
					color: "#111111",
					rightSlot: true,
					backgroundColor: [1, "#FFFFFF"],
				},
				groupChatData:[],
				groupNum:''
			}
		},
		onLoad(e) {
			this.groupNum = e.groupNum
			this.getGroupChat()
		},
		methods: {
			//项目群聊设置groupChat
			getGroupChat() {
				let data = {
					groupNum: this.groupNum
				}
				this.$api.groupChat(data).then((res) => {
					this.groupChatData = res.data.result.sysGroupPersons
				})
			},
		}
	}
</script>

<style scoped>
	.Img {
		width: 64rpx;
		height: 30rpx;
	}

	.sculptureImg {
		width: 104rpx;
		height: 104rpx;
		max-width: 100%;
		max-height: 100%;
		border-radius: 50%;
		margin: 3rpx;
	}

	.navName {
		background-color: #FFFFFF;
		padding: 30rpx;
		margin: 30rpx 0;
	}
</style>
